fix: Fix deadlock issues by adding ConfigureAwait(false) - #306
Merged
Conversation
…ibrary This commit addresses critical deadlock issues that were causing libraries to hang: 1. Fixed synchronous Dispose() methods that were blocking on async disposal - Added ConfigureAwait(false) to prevent synchronization context capture - Added exception handling to suppress disposal exceptions per IDisposable pattern 2. Added ConfigureAwait(false) to all await statements in library code - Updated 25 files with 200+ await statements - Covers all async patterns: Task.WhenAll, Task.Run, async foreach, etc. - Ensures no synchronization context capture in library code This prevents deadlocks when the library is used in UI or ASP.NET contexts where the synchronization context can cause blocking. All 498 tests pass confirming no functionality was broken. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
thomhurst
had a problem deploying
to
Pull Requests
August 8, 2025 22:41 — with
GitHub Actions
Failure
Found and fixed additional methods that were returning Task.WhenAll directly without awaiting with ConfigureAwait(false). This completes the comprehensive ConfigureAwait(false) implementation across the entire library. Fixed files: - BatchAsyncProcessor.cs & BatchAsyncProcessor_1.cs - ParallelAsyncProcessor.cs & ParallelAsyncProcessor_1.cs - UnboundedParallelAsyncProcessor.cs & UnboundedParallelAsyncProcessor_1.cs - ResultBatchAsyncProcessor_1.cs & ResultBatchAsyncProcessor_2.cs - ResultParallelAsyncProcessor_1.cs & ResultParallelAsyncProcessor_2.cs - ResultUnboundedParallelAsyncProcessor_1.cs & ResultUnboundedParallelAsyncProcessor_2.cs All methods now properly use async/await with ConfigureAwait(false) pattern. All 498 tests pass. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses critical deadlock issues that were causing libraries to hang:
Fixed synchronous Dispose() methods that were blocking on async disposal
Added ConfigureAwait(false) to all await statements in library code
This prevents deadlocks when the library is used in UI or ASP.NET contexts where the synchronization context can cause blocking.
All 498 tests pass confirming no functionality was broken.